<?php

namespace Home\Controller;

use Think\Controller;

class CommonController extends Controller {
    /**
    * 防盗链
    * @return
    */
    public function _initialize() {
        // utf-8编码
        header('Content-Type: text/html; charset=utf-8');
        if(!isset($_SESSION['admin_id']) || empty($_SESSION['admin_id'])){
            $this->redirect('Login/index');
        }
    }
}